#include"../source/server.hpp"

int main(){
    std::cout<<"TCP Client Test Program"<<std::endl;
    Socket cli_sock;
    cli_sock.Create();
    cli_sock.Connect(8500,"127.0.0.1");
    for(int i=1;i<=5;i++){
        std::string msg = "Hello, Loop!";
        cli_sock.Send(msg.c_str(), msg.size());
        char recv_buf[1024];
        int recv_len = cli_sock.Recv(recv_buf, 1023);
        recv_buf[recv_len] = '\0';
        DBG_LOG("%s", recv_buf);
       sleep(1);
    }
    while(true){
        sleep(1);
        std::cout<<"----------"<<"\n";
    }
    cli_sock.Close();
    return 0;
}